angular.module('follower',['api','data'])
.controller('followerCtrl',['$scope','AsyncAPI','dataService',function($scope,AsyncAPI,dataService){
    $scope.details=dataService.details;
    /*
    AsyncAPI.GetEntries().then(function(result){
        $scope.entries=result.data;
    });
    */
    $scope.getDetail=function(entry){
        $scope.detail=$scope.details.find((d)=>{
            return d.entry===entry;
        });
        /*
        AsyncAPI.GetDetail(entry).then(function(result){
            $scope.detail=result.data;
        });*/   
    }
    $scope.submit=function(){
        var entry=$scope.detail.entry;
        var response=$scope.response;
        /*
        AsyncAPI.SaveDetail(entry,detail).then(function(){
           alert('Save successfully.'); 
        });*/
    }
}])